#ifndef __RC_H__
#define __RC_H__

#include "main.h"
#include "usart.h"
#include "bsp_uart.h"

typedef struct
{
	float X;
	float Y;
	float Yaw;
}Save_DataTypeDef;

typedef struct 
{
	UART_HandleTypeDef* huart;
	uint8_t mode;
	uint8_t yaw_ctrl;
	uint8_t ball_speed_ctrl;
	uint8_t gear;
	uint8_t cmd_gear;
	uint8_t save_flag;
	uint8_t AK7010_flag;
	float X;
	float Y;
	float Yaw;
	float Extra_Speed;
	float Extra_Angle;
	Save_DataTypeDef Save_Data[8];
}Remote_DataTypeDef;

extern Remote_DataTypeDef RC_Data;

void RC_Init(Remote_DataTypeDef* RC,UART_HandleTypeDef* huart);
void RC_Send_Data(Remote_DataTypeDef* RC);
void RC_Callback(Remote_DataTypeDef* RC,uint8_t* data,Rx_DataTypeDef* Rx_Buffer);


#endif
